﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using CCWin;

namespace DC.Views
{
    public partial class Form_FeeDetail : Skin_DevExpress
    {
        public Form_FeeDetail()
        {
            InitializeComponent();
        }

        Utils.Database DB = Utils.Global.GlobalDB;
        public string FeeID = string.Empty;

        private void Form_FeeDetail_Load(object sender, EventArgs e)
        {
            string sql = @"select Charge_Project as 收费项目,
                            Charge_SinglePrice as 单价,
                            Charge_Suffix as 单位,
                            Charge_Num as 数量,
                            Charge_TotalPrice as 总价
                            from ChargeDetails where Fee_ID='" + FeeID + "'";
            skinDataGridView1.DataSource = DB.GetDs(sql).Tables[0].DefaultView;
            skinDataGridView1.Columns[0].Width = 250;

            string sql2 = @"select Fee_ID as 收费单号,
                            Fee_Time as 收费时间,
                            [User].Real_Name as 收费医生,
                            Fee_Price as 本次费用,
                            Fee_Should as 本次应交,
                            Fee_Real as 本次实交,
                            Fee_Debt as 本次欠费,
                            Fee_Payment as 支付方式
                            from Fee,[User] where Fee_ID='" + FeeID + "' and Fee.User_ID=[User].User_ID";
            DataView dv = DB.GetDs(sql2).Tables[0].DefaultView;
            label9.Text = dv[0][0].ToString();
            label10.Text = dv[0][1].ToString();
            label11.Text = dv[0][2].ToString();
            label12.Text = dv[0][3].ToString();
            label13.Text = dv[0][4].ToString();
            label14.Text = dv[0][5].ToString();
            label15.Text = dv[0][6].ToString();
            label16.Text = dv[0][7].ToString();
        }
    }
}
